/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.biness.product.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
* @website https://el-admin.vip
* @description /
* @author yanzz
* @date 2021-02-18
**/
@Entity
@Data
@Table(name="t_hf_product_detail")
public class THfProductDetail implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "id")
    private Integer id;

    @Column(name = "level")
    @ApiModelProperty(value = "年级")
    private String level;

    @Column(name = "best_course")
    @ApiModelProperty(value = "A级课程")
    private Integer bestCourse;

    @Column(name = "one_to_one")
    @ApiModelProperty(value = "1对1")
    private Integer oneToOne;

    @Column(name = "one_to_two")
    @ApiModelProperty(value = "1对2")
    private Integer oneToTwo;

    @Column(name = "three_to_six")
    @ApiModelProperty(value = "3-6班组")
    private Integer threeToSix;

    @Column(name = "seven_to_max")
    @ApiModelProperty(value = "7-12班组")
    private Integer sevenToMax;

    @Column(name = "cost_version")
    @ApiModelProperty(value = "价格版本号")
    private Integer costVersion;

    public void copy(THfProductDetail source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}